<%-- 
    Document   : ChiTietApContent
    Created on : Oct 27, 2011, 1:23:11 PM
    Author     : kijoo
--%>

<%@page import="MODEL.POJO.*"%>
<%@page import="java.util.ArrayList"%>
<%@page import="MODEL.DAO.LoaiSanPhamDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String loaisanpham = (String) request.getAttribute("LoaiSanPhams");
    String idloaisp = (String) request.getAttribute("IDLoaiSPchitiet");
    String idloaidm = (String) request.getAttribute("IDLoaiDM");
    String tenloaidm = (String) request.getAttribute("TenLoaiDM");
    ChiTietSanPhamPOJO ctsp = (ChiTietSanPhamPOJO) request.getAttribute("ChiTiet");

%>
<div id="dmchon">
    <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=tenloaidm%>&nbsp;&nbsp;>>&nbsp;&nbsp;<%=ctsp.getTensanpham()%>
    </strong>
</div> 
<div class="noidung">
    <div>
        <table width="100%" border="0" align="center">
            <tr>
            <td width="19%">&nbsp;</td>
            <td width="61%"><a title="<%=ctsp.getTensanpham()%>" style="color:#FF0000; font-size:16px;"><strong><span style="color:#0066FF; CURSOR: hand" onMouseOver="this.style.color='#FF0000'; " onMouseOut="this.style.color='#0066FF'; "><%=ctsp.getTensanpham()%></span></strong></a></td>
            <td width="20%">&nbsp;</td>
            </tr>
            <tr>
            <td rowspan="3"><div align="center"><img src="<%=ctsp.getHinh()%>" /></div></td>
            <td><strong>Model: </strong>MC984ZP/A</td>
            <td><div align="center" style="color:#FF0000"><%=ctsp.getGiaban()%> VNĐ</div></td>
            </tr>
            <tr>
            <td><%=ctsp.getMota()%></td>
            <td><div align="center"><div class="muahang"><a href="CartAppleController?Action=ChoVaoGioHang&idloaisanpham=<%=request.getParameter("Action")%>&idchitietsanpham=<%=ctsp.getIdchitietsanpham()%>"><img src="images/dathang1.gif"/></a></div></div></td>
            </tr>
            <tr>
            <td><strong>Bảo hành</strong> <%=ctsp.getBaohanh()%> Tháng | <strong>Kho hàng </strong><%=ctsp.getSoluongton()%></td>
            <td></td>
            </tr>
            <tr>
            <td><div align="center">Lượt xem <%=ctsp.getSolanxem()%></div></td>
            <td><strong>Vận chuyển</strong> To&agrave;n qu&#7889;c</td>
            <td>&nbsp;</td>
            </tr>
            <tr>
            <td height="29">&nbsp;</td>
            <td><strong>Khuyến mãi</strong> &nbsp; Mi&#7871;ng d&aacute;n m&agrave;n h&igrave;nh</td>
            <td>&nbsp;</td>
            </tr>

        </table>
        <hr>
    </div>
    <!--Lay san pham cug loai-->
    <div id="dmchon">
        <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sản phẩm cùng loại
        </strong>
    </div> 
            <table width="100%">
        <tr>
        <%
            ArrayList<ChiTietSanPhamPOJO> sanphamcungloai = (ArrayList<ChiTietSanPhamPOJO>) request.getAttribute("SanPhamCungLoai");
            for (int j = 0; j < sanphamcungloai.size(); j++) {
                ChiTietSanPhamPOJO spcungloai = sanphamcungloai.get(j);
        %>
		 <td><table>
        <tr>
        <td align="center"><a href="ChiTietAPController?Action=<%=loaisanpham%>&idchitietsanpham=<%=spcungloai.getIdchitietsanpham()%>&idloaisanpham=APPLE&idloaidanhmuc=<%=idloaidm%>&tenloaidanhmuc=<%=tenloaidm%>"/><strong><span style="color:#0066FF; CURSOR: hand" onMouseOver="this.style.color='#FF0000'; " onMouseOut="this.style.color='#0066FF'; "><%=spcungloai.getTensanpham()%></span></strong></td>
        </tr></span>
        <tr>
        <td align="center"><a href="ChiTietAPController?Action=<%=loaisanpham%>&idchitietsanpham=<%=spcungloai.getIdchitietsanpham()%>&idloaisanpham=APPLE&idloaidanhmuc=<%=idloaidm%>&tenloaidanhmuc=<%=tenloaidm%>"/><img src="<%=spcungloai.getHinh()%>" height="100px" width="150px"/></a></td>
        </tr>
        <tr>
        <td align="center"><span style="color:#666666"><%= spcungloai.getGiaban()%> VND</td>
        </tr></table></td>
        <% }%>
		</tr></table>
</div>
